LAB-9 Practice

Name : DINESH YOGESH PAREKH

Registration Number : 20MCA1013

Faculty: TULASI PRASAD SARIKI

SLOT : L13 - L14

LAB -9 K-Means

Load the Mall_Customers dataset

perform data preprocessing.

Perform k-means clustering using sklearn with arbitrary number of clusters.

Draw the inferences you find out from the clustering process.

Age and Annual Income

Draw the inferences you find out from the clustering process.

Spending Score and Annual Income

Age and Spending Score

Apply elbow method and find the optimal number clusters for the given dataset.

Perform K-means clustering using sklearn with optimal number of clusters.

Which attributes are strongly correlated with Spending Score

Apply K-means clustering using sklearn with optimal number of clusters along with highly correlated features.

Draw the inferences you find out from the clustering process.

After plotting the results obtained by K-means on this 3D graphic, it's our job now to identify and describe the five clusters that have been created:

Yellow Cluster - The yellow cluster groups young people with moderate to low annual income who actually spend a lot.

Purple Cluster - The purple cluster groups reasonably young people with pretty decent salaries who spend a lot.

Pink Cluster - The pink cluster basically groups people of all ages whose salary isn't pretty high and their spending score is moderate.

Orange Cluster - The orange cluster groups people who actually have pretty good salaries and barely spend money, their age usually lays between thirty and sixty years.

Blue Cluster - The blue cluster groups whose salary is pretty low and don't spend much money in stores, they are people of all ages.

Conclusions¶

After developing a solution for this problem, we have come to the following conclusions:

KMeans Clustering is a powerful technique in order to achieve a decent customer segmentation. Customer segmentation is a good way to understand the behaviour of different customers and plan a good marketing strategy accordingly. There isn't much difference between the spending score of women and men, which leads us to think that our behaviour when it comes to shopping is pretty similar. Observing the clustering graphic, it can be clearly observed that the ones who spend more money in malls are young people. That is to say they are the main target when it comes to marketing, so doing deeper studies about what they are interested in may lead to higher profits. Althought younglings seem to be the ones spending the most, we can't forget there are more people we have to consider, like people who belong to the pink cluster, they are what we would commonly name after "middle class" and it seems to be the biggest cluster. Promoting discounts on some shops can be something of interest to those who don't actually spend a lot and they may end up spending more!